package com.raos.mongo.demo.entity;

import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

/**
 * mongo映射测试实体类 Member
 *
 * @author raos
 * @emil 991207823@qq.com
 * @date 2021/8/30 22:02
 */
@Document(collection = "t_member")
public class Member implements Serializable {

    @Id
    private ObjectId id;
    private String name;
    private String addr;
    private Long createTime;

    public ObjectId getId() {
        return id;
    }

    public void setId(ObjectId id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Member{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", addr='" + addr + '\'' +
                ", createTime=" + createTime +
                '}';
    }

}
